import request from '@/utils/request'

export function add(data) {
  return request({
    url: '/user',
    method: 'post',
    data
  })
}
export function update(data) {
  return request({
    url: '/user',
    method: 'put',
    data
  })
}

export function getUserList(data) {
  return request({
    url: '/user/list',
    method: 'post',
    data
  })
}

export function listByMobile() {
  return request({
    url: '/user/listByMobile',
    method: 'get'
  })
}

export function page(data) {
  return request({
    url: '/house/page',
    method: 'post',
    data
  })
}

export function getById(token) {
  return request({
    url: '/house',
    method: 'get',
    params: { token }
  })
}

export function pageDetail(id) {
  return request({
    url: '/house/' + id,
    method: 'get'
  })
}
